package com.mobiporter.utils;

import java.io.BufferedReader;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.io.InputStreamReader;

public class FileUtils
{
  public static String getStringFromFile()
  {
    File f = new File("WebContent/flightDataReturn.txt");
    try
    {
      FileInputStream fis = new FileInputStream(f);
      BufferedReader r = new BufferedReader(new InputStreamReader(fis));
      String s = "";
      String output = "" ;
      while ( (s = r.readLine())!=null)
      {
        output +=s +"\n" ;
      }
      return output ;
    } 
    catch (FileNotFoundException e)
    {
      e.printStackTrace();
    } 
    catch (IOException e)
    {
      e.printStackTrace();
    }
    return null ;
    
  }
}
